package br.com.utdd.cadastro.enumeration;

import java.util.ArrayList;
import java.util.List;

/**
 * @author diego.duarte
 */
public enum SexoEnumeration {
    
	MASCULINO("M", "Masculino"), FEMININO("F", "Feminino");

    private final String code;
    private final String message;

    /**
     * Construtor do enum
     * @param code - Valor do enum
     * @param message - Label do enum
     */
    private SexoEnumeration(String code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * Returns field code.
     * @return code
     */
    public String getCode() {
        return code;
    }

    /**
     * Returns field message.
     * @return message
     */
    public String getMessage() {
        return message;
    }

    /**
     * Lista retorna valores do Enum
     * @return vRetorno
     */
    public static List<SexoEnumeration> getValues() {
        List<SexoEnumeration> vRetorno = new ArrayList<SexoEnumeration>();

        SexoEnumeration[] vList = SexoEnumeration.values();

        for (SexoEnumeration vSexo : vList) {
            vRetorno.add(vSexo);
        }
        return vRetorno;
    }
}
